const chai = require('chai')
const should = chai.should()
const airsign = require('../src/index')

describe("airsign测试",() => {
	let msg = "hello world"
	let key = '123456'
	
	// it('md5 test',() => {
	//     let hash = airsign.md5(msg)
	// 	hash.should.equal("5eb63bbbe01eeed093cb22bb8f5acdc3")
	// })
	
	// it('sha1 test',() => {
	//     let hash = airsign.sha1(msg)
	// 	hash.should.equal("2aae6c35c94fcfb415dbe95f408b9ce91ee846ed")
	// })
	
	// it('sha256 test',() => {
	//     let hash = airsign.sha256(msg)
	// 	hash.should.equal("b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9")
	// })
	
	// it('hmacSha256 test',() => {
	//     let hash = airsign.hmacSha256(msg, key)
	// 	hash.should.equal("297240a2addf73ec57fac218189e4d99698afad3442b620865fc1ea2fc9de160")
	// })
	
	// it('hmacSha1 test',() => {
	//     let hash = airsign.hmacSha1(msg, key)
	// 	hash.should.equal("df63a28970061826ac59182d1edb9590334407fe")
	// })
	
	// it('pbkdf2 test',() => {
	//     let hash = airsign.pbkdf2('123456', '000000')
	// 	hash.should.equal("86b6e9de617cbf42882811340ee328c971e2ed43ee383b1cceb94e4eecb07cfc")
	// })
	
	// it('publicKey test',() => {
	//     let result = airsign.publicKey('123456', '420683198809272130')
	// 	result.should.equal("64a62cd071ff56c50f813d33137ab140f8b564a307bb38d352b21b798dc63c896a5a7e0bcfe9474d404ab64897d9a51e2ba4783303fd257780e6ce3e1a84cfe1")
	// })
	
	// it('sign test',() => {
	//     let result = airsign.sign(msg, '123456', '420683198809272130')
	// 	console.log('signature', result)
	// })
	
	// it('verify test',() => {
	// 	let sign = '9357295e5afeefda3445ff294203409916a8f1fde18cf12cacb8ee06d3fab97c43942bb4443d6b432044604315b5ace0081d6d5f30f972e672ea2ee7d8b2ee0c'
	//     let result = airsign.verify(msg, sign, '123456', '420683198809272130')
	// 	result.should.equal(true)
	// })
	
	it('encrypt test',() => {
	    let result = airsign.encrypt(msg, '123456', '420683198809272130')
		console.log(result)
		// result.should.equal(true)
	})
})